package com.zeng.nicecore.util;

import org.springframework.beans.BeanUtils;
import org.springframework.util.Assert;

public class BeanUtil {
    public static  <T,V> V beanToVo(T bean,V vo,String... ignore) {

        if (bean == null || vo == null) {
            return null;
        }
        BeanUtils.copyProperties(bean, vo,ignore);
        return vo;
    }

    public static <T, V> T VoToBean(V vo, T bean,String... ignore) {
        if (bean == null || vo == null) {
            return null;
        }
        BeanUtils.copyProperties(vo, bean,ignore);
        return bean;
    }
}
